##from ..sts import STS, NodeWrapper
##
##class DFS(STS):
##    """Depth-first tree search algorithm. The only things that must be changed are the queue 
##    manipulation methods fetch_node() and queue_node()."""
##    def fetch_node(self):
##        return self.queue.pop()
##        
##    def queue_node(self, node):
##        # First check if the node is a leaf.
##        if self.is_leaf(node):
##            self.check_leaf(node)
##            return
##        # Immediately prune the node if it cannot lead to improving solutions.
##        lower_bound = self.lower_bound(node)
##        if lower_bound >= self.upper_bound:
##            self.pruned += 1
##            return
##        # Add the node to the queue and check the queue size limit.
##        self.queue.append(NodeWrapper(node, None, lower_bound))
##        if len(self.queue) > self.queue_limit:
##            self.queue.popleft()
##            self.discarded += 1
##            
